package com.sm.dao;

import java.util.List;

import com.sm.model.SearchHistory;
import org.apache.ibatis.annotations.Param;

public interface SearchHistoryMapper {
    int deleteByPrimaryKey(Integer searchHistoryId);

    int insert(SearchHistory record);

    int insertSelective(SearchHistory record);

    SearchHistory selectByPrimaryKey(Integer searchHistoryId);

    int updateByPrimaryKeySelective(SearchHistory record);

    int updateByPrimaryKey(SearchHistory record);
    
    
    
    /**
     * 根据用户id查询其搜索记录。
     * @param userId
     * @return
     */
    List<SearchHistory> selectsearchByUserId(@Param("userId")Integer userId);
    
    /**
     *	根据用户id清除所有的历史记录
     * @param userId	用户id
     * @return
     */
    int clearSearchByUserId(@Param("userId")Integer userId);
}